using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class EchoRequest : GeneratedMessageLite<EchoRequest, EchoRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<EchoRequest, EchoRequest.Builder>
		{
			private bool resultIsReadOnly;
			private EchoRequest result;
			protected override EchoRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override EchoRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override EchoRequest DefaultInstanceForType
			{
				get
				{
					return EchoRequest.DefaultInstance;
				}
			}
			public string EchoStr
			{
				get
				{
					return this.result.EchoStr;
				}
				set
				{
					this.SetEchoStr(value);
				}
			}
			public string Pwd
			{
				get
				{
					return this.result.Pwd;
				}
				set
				{
					this.SetPwd(value);
				}
			}
			public Builder()
			{
				this.result = EchoRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(EchoRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private EchoRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					EchoRequest other = this.result;
					this.result = new EchoRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override EchoRequest.Builder Clear()
			{
				this.result = EchoRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override EchoRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new EchoRequest.Builder(this.result);
				}
				return new EchoRequest.Builder().MergeFrom(this.result);
			}
			public override EchoRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override EchoRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is EchoRequest)
				{
					return this.MergeFrom((EchoRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override EchoRequest.Builder MergeFrom(EchoRequest other)
			{
				return this;
			}
			public override EchoRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override EchoRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(EchoRequest._echoRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = EchoRequest._echoRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasPwd = input.ReadString(ref this.result.pwd_);
						}
					}
					else
					{
						this.result.hasEchoStr = input.ReadString(ref this.result.echoStr_);
					}
				}
				return this;
			}
			public EchoRequest.Builder SetEchoStr(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasEchoStr = true;
				this.result.echoStr_ = value;
				return this;
			}
			public EchoRequest.Builder ClearEchoStr()
			{
				this.PrepareBuilder();
				this.result.hasEchoStr = false;
				this.result.echoStr_ = "";
				return this;
			}
			public EchoRequest.Builder SetPwd(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasPwd = true;
				this.result.pwd_ = value;
				return this;
			}
			public EchoRequest.Builder ClearPwd()
			{
				this.PrepareBuilder();
				this.result.hasPwd = false;
				this.result.pwd_ = "";
				return this;
			}
		}
		public const int EchoStrFieldNumber = 1;
		public const int PwdFieldNumber = 2;
		private static readonly EchoRequest defaultInstance;
		private static readonly string[] _echoRequestFieldNames;
		private static readonly uint[] _echoRequestFieldTags;
		private bool hasEchoStr;
		private string echoStr_ = "";
		private bool hasPwd;
		private string pwd_ = "";
		private int memoizedSerializedSize = -1;
		public static EchoRequest DefaultInstance
		{
			get
			{
				return EchoRequest.defaultInstance;
			}
		}
		public override EchoRequest DefaultInstanceForType
		{
			get
			{
				return EchoRequest.DefaultInstance;
			}
		}
		protected override EchoRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string EchoStr
		{
			get
			{
				return this.echoStr_;
			}
		}
		public string Pwd
		{
			get
			{
				return this.pwd_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasEchoStr)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.EchoStr);
				}
				if (this.hasPwd)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.Pwd);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private EchoRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] echoRequestFieldNames = EchoRequest._echoRequestFieldNames;
			if (this.hasEchoStr)
			{
				output.WriteString(1, echoRequestFieldNames[0], this.EchoStr);
			}
			if (this.hasPwd)
			{
				output.WriteString(2, echoRequestFieldNames[1], this.Pwd);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasEchoStr)
			{
				num ^= this.echoStr_.GetHashCode();
			}
			if (this.hasPwd)
			{
				num ^= this.pwd_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			EchoRequest echoRequest = object_0 as EchoRequest;
			return echoRequest != null && (this.hasEchoStr == echoRequest.hasEchoStr && (!this.hasEchoStr || this.echoStr_.Equals(echoRequest.echoStr_))) && (this.hasPwd == echoRequest.hasPwd && (!this.hasPwd || this.pwd_.Equals(echoRequest.pwd_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<EchoRequest, EchoRequest.Builder>.PrintField("EchoStr", this.hasEchoStr, this.echoStr_, writer);
			GeneratedMessageLite<EchoRequest, EchoRequest.Builder>.PrintField("Pwd", this.hasPwd, this.pwd_, writer);
		}
		public static EchoRequest ParseFrom(byte[] data)
		{
			return EchoRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private EchoRequest MakeReadOnly()
		{
			return this;
		}
		public static EchoRequest.Builder CreateBuilder()
		{
			return new EchoRequest.Builder();
		}
		public override EchoRequest.Builder ToBuilder()
		{
			return EchoRequest.CreateBuilder(this);
		}
		public override EchoRequest.Builder CreateBuilderForType()
		{
			return new EchoRequest.Builder();
		}
		public static EchoRequest.Builder CreateBuilder(EchoRequest prototype)
		{
			return new EchoRequest.Builder(prototype);
		}
		static EchoRequest()
		{
			EchoRequest.defaultInstance = new EchoRequest().MakeReadOnly();
			EchoRequest._echoRequestFieldNames = new string[]
			{
				"EchoStr",
				"Pwd"
			};
			EchoRequest._echoRequestFieldTags = new uint[]
			{
				10u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.EchoRequest.Descriptor, null);
		}
	}
}
